package p270jp.pxv.android.behavior;

import android.view.View;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.RecyclerView;
import p270jp.pxv.android.behavior.ActionBarBehavior;

/* renamed from: jp.pxv.android.behavior.ActionBarBehavior */
/* loaded from: classes2.dex */
public class ActionBarBehavior extends CoordinatorLayout.AbstractC0567c<View> {

    /* renamed from: a */
    public RecyclerView f18882a;

    /* renamed from: b */
    public boolean f18883b;

    @Override // androidx.coordinatorlayout.widget.CoordinatorLayout.AbstractC0567c
    /* renamed from: h */
    public boolean mo2823h(CoordinatorLayout coordinatorLayout, View view, int i) {
        if (this.f18883b) {
            return false;
        }
        coordinatorLayout.post(new Runnable(coordinatorLayout, view, i) { // from class: ye.a

            /* renamed from: b */
            public final /* synthetic */ CoordinatorLayout f30866b;

            /* renamed from: c */
            public final /* synthetic */ View f30867c;

            /* renamed from: d */
            public final /* synthetic */ int f30868d;

            {
                this.f30866b = r2;
                this.f30867c = r3;
                this.f30868d = r4;
            }

            @Override // java.lang.Runnable
            public final void run() {
                ActionBarBehavior.this.mo4638s(this.f30866b, this.f30867c, this.f30868d);
            }
        });
        this.f18883b = true;
        return false;
    }

    /* renamed from: s */
    public void mo4638s(CoordinatorLayout coordinatorLayout, View view, int i) {
        int indexOfChild = coordinatorLayout.indexOfChild(view);
        if (indexOfChild > 0) {
            View childAt = coordinatorLayout.getChildAt(indexOfChild - 1);
            if (childAt instanceof NestedScrollView) {
                ((NestedScrollView) childAt).getChildAt(0).setPadding(0, 0, 0, view.getHeight());
            }
            view.setY((float) (coordinatorLayout.getHeight() - view.getHeight()));
        }
    }
}
